<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>v-if的使用</title>
</head>

<body>
  <div id="app">
    <!-- v-if：当满足某种条件时才渲染元素 -->
    <h2 v-if="ifShow"> {{message}} </h2>
  </div>
  <script src="../js/vue.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        message:'你好啊',
        ifShow: true,
      },
    })
  </script>
</body>

</html>